package cn.singno.bob.coffice.bean;

import cn.singno.bob.common.exception.FileOperateException;
import cn.singno.bob.common.utils.Fileutils;



/**
 * <p>名称：Word4Image.java</p>
 * <p>描述： word 文档中的图片对象</p>
 * <pre>
 *    
 * </pre>
 * @author 鲍建明
 * @date 2014年8月6日 上午11:04:54
 * @version 1.0.0
 */
public class Word4Image {

	/**
	 * 图片宽
	 */
	private Integer width; 
	/**
	 * 图片高
	 */
	private Integer height;
	
	/**
	 * 图片类型
	 */
	private String type;
	/**
	 * 图片简介
	 */
	private String photoTitle;
	
	/**
	 * 图片对象
	 */
	private String file;
	
	
	
	

	public Word4Image() {
		super();
	}

	public Word4Image(Integer width, Integer height, String photoTitle,
			String file) {
		super();
		this.width = width;
		this.height = height;
		this.photoTitle = photoTitle;
		this.file = file;
	}
	
	

	public Word4Image(Integer width, Integer height, String file) {
		super();
		this.width = width;
		this.height = height;
		this.file = file;
	}

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}

	public String getType() {
		return Fileutils.getFileSuffixType(this.file);
	}


	public String getPhotoTitle() {
		return photoTitle;
	}

	public void setPhotoTitle(String photoTitle) {
		this.photoTitle = photoTitle;
	}

	public byte[] getFile() throws FileOperateException {
		return Fileutils.file2ByteArray(this.file);
	}

	public void setFile(String file) {
		this.file = file;
	}
}
